package com.zhuhao.utils.easyexcel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

// 设置全局列宽为20
@ColumnWidth(20)
// 设置全局内容居中
@ContentStyle(verticalAlignment = VerticalAlignmentEnum.CENTER, horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Department {

    // @ExcelProperty作用：设置列标题名称
    @ExcelProperty({"部门基本属性", "部门名称"})
    private String deptName;

    @ExcelProperty({"部门基本属性", "部门Code"})
    private String deptCode;

    @ExcelProperty({"部门其他属性", "部门地址"})
    private String deptLocation;

    @ExcelProperty({"部门其他属性", "部门类型"})
    private String deptType;

}
